/**
 * Selling Partner API for Replenishment
 * The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.
 *
 * The version of the OpenAPI document: 2022-11-07
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import { ApiClient } from '../ApiClient.js'

/**
 * The ListOffersRequestPagination model module.
 * @module replenishment_v2022_11_07/model/ListOffersRequestPagination
 * @version 2022-11-07
 */
export class ListOffersRequestPagination {
  /**
   * Constructs a new <code>ListOffersRequestPagination</code>.
   * Use these parameters to paginate through the response.
   * @alias module:replenishment_v2022_11_07/model/ListOffersRequestPagination
   * @class
   * @param limit {Number} The maximum number of results to return in the response.
   * @param offset {Number} The offset from which to retrieve the number of results specified by the `limit` value. The first result is at offset 0.
   */
  constructor (limit, offset) {
    this.limit = limit
    this.offset = offset
  }

  /**
   * Constructs a <code>ListOffersRequestPagination</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {ListOffersRequestPagination} obj Optional instance to populate.
   * @return {ListOffersRequestPagination} The populated <code>ListOffersRequestPagination</code> instance.
   */
  static constructFromObject (data, obj) {
    if (data) {
      switch (typeof data) {
        case 'string':
          obj = String(data)
          break
        case 'number':
          obj = Number(data)
          break
        case 'boolean':
          obj = Boolean(data)
          break
      }
      obj = obj || new ListOffersRequestPagination()
      if (data.hasOwnProperty('limit')) { obj.limit = ApiClient.convertToType(data.limit, 'Number') }
      if (data.hasOwnProperty('offset')) { obj.offset = ApiClient.convertToType(data.offset, 'Number') }
    }
    return obj
  }
}

/**
 * The maximum number of results to return in the response.
 * @member {Number} limit
 * @type {Number}
 */
ListOffersRequestPagination.prototype.limit = undefined

/**
 * The offset from which to retrieve the number of results specified by the `limit` value. The first result is at offset 0.
 * @member {Number} offset
 * @type {Number}
 */
ListOffersRequestPagination.prototype.offset = undefined
